{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import time\n",
    "import json\n",
    "import requests\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'province': '香港',\n",
       "  'nowConfirm': 164,\n",
       "  'confirm': 5220,\n",
       "  'dead': 105,\n",
       "  'heal': 4951,\n",
       "  'deadRate': '2.01',\n",
       "  'healRate': '94.85'},\n",
       " {'province': '上海',\n",
       "  'nowConfirm': 76,\n",
       "  'confirm': 1080,\n",
       "  'dead': 7,\n",
       "  'heal': 997,\n",
       "  'deadRate': '0.65',\n",
       "  'healRate': '92.31'},\n",
       " {'province': '台湾',\n",
       "  'nowConfirm': 37,\n",
       "  'confirm': 535,\n",
       "  'dead': 7,\n",
       "  'heal': 491,\n",
       "  'deadRate': '1.31',\n",
       "  'healRate': '91.78'},\n",
       " {'province': '广东',\n",
       "  'nowConfirm': 37,\n",
       "  'confirm': 1877,\n",
       "  'dead': 8,\n",
       "  'heal': 1832,\n",
       "  'deadRate': '0.43',\n",
       "  'healRate': '97.60'},\n",
       " {'province': '四川',\n",
       "  'nowConfirm': 35,\n",
       "  'confirm': 724,\n",
       "  'dead': 3,\n",
       "  'heal': 686,\n",
       "  'deadRate': '0.41',\n",
       "  'healRate': '94.75'},\n",
       " {'province': '陕西',\n",
       "  'nowConfirm': 29,\n",
       "  'confirm': 434,\n",
       "  'dead': 3,\n",
       "  'heal': 402,\n",
       "  'deadRate': '0.69',\n",
       "  'healRate': '92.63'},\n",
       " {'province': '山东',\n",
       "  'nowConfirm': 14,\n",
       "  'confirm': 845,\n",
       "  'dead': 7,\n",
       "  'heal': 824,\n",
       "  'deadRate': '0.83',\n",
       "  'healRate': '97.51'},\n",
       " {'province': '内蒙古',\n",
       "  'nowConfirm': 11,\n",
       "  'confirm': 275,\n",
       "  'dead': 1,\n",
       "  'heal': 263,\n",
       "  'deadRate': '0.36',\n",
       "  'healRate': '95.64'},\n",
       " {'province': '福建',\n",
       "  'nowConfirm': 10,\n",
       "  'confirm': 417,\n",
       "  'dead': 1,\n",
       "  'heal': 406,\n",
       "  'deadRate': '0.24',\n",
       "  'healRate': '97.36'},\n",
       " {'province': '云南',\n",
       "  'nowConfirm': 9,\n",
       "  'confirm': 211,\n",
       "  'dead': 2,\n",
       "  'heal': 200,\n",
       "  'deadRate': '0.95',\n",
       "  'healRate': '94.79'},\n",
       " {'province': '辽宁',\n",
       "  'nowConfirm': 8,\n",
       "  'confirm': 280,\n",
       "  'dead': 2,\n",
       "  'heal': 270,\n",
       "  'deadRate': '0.71',\n",
       "  'healRate': '96.43'},\n",
       " {'province': '天津',\n",
       "  'nowConfirm': 8,\n",
       "  'confirm': 251,\n",
       "  'dead': 3,\n",
       "  'heal': 240,\n",
       "  'deadRate': '1.20',\n",
       "  'healRate': '95.62'},\n",
       " {'province': '山西',\n",
       "  'nowConfirm': 4,\n",
       "  'confirm': 208,\n",
       "  'dead': 0,\n",
       "  'heal': 204,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '98.08'},\n",
       " {'province': '江苏',\n",
       "  'nowConfirm': 4,\n",
       "  'confirm': 669,\n",
       "  'dead': 0,\n",
       "  'heal': 665,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '99.40'},\n",
       " {'province': '河北',\n",
       "  'nowConfirm': 4,\n",
       "  'confirm': 368,\n",
       "  'dead': 6,\n",
       "  'heal': 358,\n",
       "  'deadRate': '1.63',\n",
       "  'healRate': '97.28'},\n",
       " {'province': '河南',\n",
       "  'nowConfirm': 3,\n",
       "  'confirm': 1281,\n",
       "  'dead': 22,\n",
       "  'heal': 1256,\n",
       "  'deadRate': '1.72',\n",
       "  'healRate': '98.05'},\n",
       " {'province': '浙江',\n",
       "  'nowConfirm': 3,\n",
       "  'confirm': 1283,\n",
       "  'dead': 1,\n",
       "  'heal': 1279,\n",
       "  'deadRate': '0.08',\n",
       "  'healRate': '99.69'},\n",
       " {'province': '重庆',\n",
       "  'nowConfirm': 2,\n",
       "  'confirm': 586,\n",
       "  'dead': 6,\n",
       "  'heal': 578,\n",
       "  'deadRate': '1.02',\n",
       "  'healRate': '98.63'},\n",
       " {'province': '北京',\n",
       "  'nowConfirm': 1,\n",
       "  'confirm': 937,\n",
       "  'dead': 9,\n",
       "  'heal': 927,\n",
       "  'deadRate': '0.96',\n",
       "  'healRate': '98.93'},\n",
       " {'province': '广西',\n",
       "  'nowConfirm': 1,\n",
       "  'confirm': 260,\n",
       "  'dead': 2,\n",
       "  'heal': 257,\n",
       "  'deadRate': '0.77',\n",
       "  'healRate': '98.85'},\n",
       " {'province': '湖北',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 68139,\n",
       "  'dead': 4512,\n",
       "  'heal': 63627,\n",
       "  'deadRate': '6.62',\n",
       "  'healRate': '93.38'},\n",
       " {'province': '吉林',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 157,\n",
       "  'dead': 2,\n",
       "  'heal': 155,\n",
       "  'deadRate': '1.27',\n",
       "  'healRate': '98.73'},\n",
       " {'province': '青海',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 18,\n",
       "  'dead': 0,\n",
       "  'heal': 18,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '100.00'},\n",
       " {'province': '澳门',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 46,\n",
       "  'dead': 0,\n",
       "  'heal': 46,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '100.00'},\n",
       " {'province': '甘肃',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 170,\n",
       "  'dead': 2,\n",
       "  'heal': 168,\n",
       "  'deadRate': '1.18',\n",
       "  'healRate': '98.82'},\n",
       " {'province': '宁夏',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 75,\n",
       "  'dead': 0,\n",
       "  'heal': 75,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '100.00'},\n",
       " {'province': '湖南',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 1019,\n",
       "  'dead': 4,\n",
       "  'heal': 1015,\n",
       "  'deadRate': '0.39',\n",
       "  'healRate': '99.61'},\n",
       " {'province': '贵州',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 147,\n",
       "  'dead': 2,\n",
       "  'heal': 145,\n",
       "  'deadRate': '1.36',\n",
       "  'healRate': '98.64'},\n",
       " {'province': '黑龙江',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 948,\n",
       "  'dead': 13,\n",
       "  'heal': 935,\n",
       "  'deadRate': '1.37',\n",
       "  'healRate': '98.63'},\n",
       " {'province': '安徽',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 991,\n",
       "  'dead': 6,\n",
       "  'heal': 985,\n",
       "  'deadRate': '0.61',\n",
       "  'healRate': '99.39'},\n",
       " {'province': '新疆',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 902,\n",
       "  'dead': 3,\n",
       "  'heal': 899,\n",
       "  'deadRate': '0.33',\n",
       "  'healRate': '99.67'},\n",
       " {'province': '海南',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 171,\n",
       "  'dead': 6,\n",
       "  'heal': 165,\n",
       "  'deadRate': '3.51',\n",
       "  'healRate': '96.49'},\n",
       " {'province': '江西',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 935,\n",
       "  'dead': 1,\n",
       "  'heal': 934,\n",
       "  'deadRate': '0.11',\n",
       "  'healRate': '99.89'},\n",
       " {'province': '西藏',\n",
       "  'nowConfirm': 0,\n",
       "  'confirm': 1,\n",
       "  'dead': 0,\n",
       "  'heal': 1,\n",
       "  'deadRate': '0.00',\n",
       "  'healRate': '100.00'}]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url='https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5&callback=&_=%d'%int(time.time()*1000)\n",
    "html = requests.get(url)\n",
    "data = json.loads(html.json()['data'])\n",
    "china_data = data['areaTree'][0]['children']\n",
    "data_set = []\n",
    "for i in china_data:\n",
    "    data_dict = {}\n",
    "    data_dict['province'] = i['name']\n",
    "    data_dict['nowConfirm'] = i['total']['nowConfirm']\n",
    "    data_dict['confirm'] = i['total']['confirm']\n",
    "    data_dict['dead'] = i['total']['dead']\n",
    "    data_dict['heal'] = i['total']['heal']\n",
    "    data_dict['deadRate'] = i['total']['deadRate']\n",
    "    data_dict['healRate'] = i['total']['healRate']\n",
    "    data_set.append(data_dict)\n",
    "data_set\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>province</th>\n",
       "      <th>nowConfirm</th>\n",
       "      <th>confirm</th>\n",
       "      <th>dead</th>\n",
       "      <th>heal</th>\n",
       "      <th>deadRate</th>\n",
       "      <th>healRate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>香港</td>\n",
       "      <td>164</td>\n",
       "      <td>5220</td>\n",
       "      <td>105</td>\n",
       "      <td>4951</td>\n",
       "      <td>2.01</td>\n",
       "      <td>94.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>上海</td>\n",
       "      <td>76</td>\n",
       "      <td>1080</td>\n",
       "      <td>7</td>\n",
       "      <td>997</td>\n",
       "      <td>0.65</td>\n",
       "      <td>92.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>台湾</td>\n",
       "      <td>37</td>\n",
       "      <td>535</td>\n",
       "      <td>7</td>\n",
       "      <td>491</td>\n",
       "      <td>1.31</td>\n",
       "      <td>91.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>广东</td>\n",
       "      <td>37</td>\n",
       "      <td>1877</td>\n",
       "      <td>8</td>\n",
       "      <td>1832</td>\n",
       "      <td>0.43</td>\n",
       "      <td>97.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>四川</td>\n",
       "      <td>35</td>\n",
       "      <td>724</td>\n",
       "      <td>3</td>\n",
       "      <td>686</td>\n",
       "      <td>0.41</td>\n",
       "      <td>94.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>陕西</td>\n",
       "      <td>29</td>\n",
       "      <td>434</td>\n",
       "      <td>3</td>\n",
       "      <td>402</td>\n",
       "      <td>0.69</td>\n",
       "      <td>92.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>山东</td>\n",
       "      <td>14</td>\n",
       "      <td>845</td>\n",
       "      <td>7</td>\n",
       "      <td>824</td>\n",
       "      <td>0.83</td>\n",
       "      <td>97.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>内蒙古</td>\n",
       "      <td>11</td>\n",
       "      <td>275</td>\n",
       "      <td>1</td>\n",
       "      <td>263</td>\n",
       "      <td>0.36</td>\n",
       "      <td>95.64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>福建</td>\n",
       "      <td>10</td>\n",
       "      <td>417</td>\n",
       "      <td>1</td>\n",
       "      <td>406</td>\n",
       "      <td>0.24</td>\n",
       "      <td>97.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>云南</td>\n",
       "      <td>9</td>\n",
       "      <td>211</td>\n",
       "      <td>2</td>\n",
       "      <td>200</td>\n",
       "      <td>0.95</td>\n",
       "      <td>94.79</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>辽宁</td>\n",
       "      <td>8</td>\n",
       "      <td>280</td>\n",
       "      <td>2</td>\n",
       "      <td>270</td>\n",
       "      <td>0.71</td>\n",
       "      <td>96.43</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>天津</td>\n",
       "      <td>8</td>\n",
       "      <td>251</td>\n",
       "      <td>3</td>\n",
       "      <td>240</td>\n",
       "      <td>1.20</td>\n",
       "      <td>95.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>山西</td>\n",
       "      <td>4</td>\n",
       "      <td>208</td>\n",
       "      <td>0</td>\n",
       "      <td>204</td>\n",
       "      <td>0.00</td>\n",
       "      <td>98.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>江苏</td>\n",
       "      <td>4</td>\n",
       "      <td>669</td>\n",
       "      <td>0</td>\n",
       "      <td>665</td>\n",
       "      <td>0.00</td>\n",
       "      <td>99.40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>河北</td>\n",
       "      <td>4</td>\n",
       "      <td>368</td>\n",
       "      <td>6</td>\n",
       "      <td>358</td>\n",
       "      <td>1.63</td>\n",
       "      <td>97.28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>河南</td>\n",
       "      <td>3</td>\n",
       "      <td>1281</td>\n",
       "      <td>22</td>\n",
       "      <td>1256</td>\n",
       "      <td>1.72</td>\n",
       "      <td>98.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>浙江</td>\n",
       "      <td>3</td>\n",
       "      <td>1283</td>\n",
       "      <td>1</td>\n",
       "      <td>1279</td>\n",
       "      <td>0.08</td>\n",
       "      <td>99.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>重庆</td>\n",
       "      <td>2</td>\n",
       "      <td>586</td>\n",
       "      <td>6</td>\n",
       "      <td>578</td>\n",
       "      <td>1.02</td>\n",
       "      <td>98.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>北京</td>\n",
       "      <td>1</td>\n",
       "      <td>937</td>\n",
       "      <td>9</td>\n",
       "      <td>927</td>\n",
       "      <td>0.96</td>\n",
       "      <td>98.93</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>广西</td>\n",
       "      <td>1</td>\n",
       "      <td>260</td>\n",
       "      <td>2</td>\n",
       "      <td>257</td>\n",
       "      <td>0.77</td>\n",
       "      <td>98.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>湖北</td>\n",
       "      <td>0</td>\n",
       "      <td>68139</td>\n",
       "      <td>4512</td>\n",
       "      <td>63627</td>\n",
       "      <td>6.62</td>\n",
       "      <td>93.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>吉林</td>\n",
       "      <td>0</td>\n",
       "      <td>157</td>\n",
       "      <td>2</td>\n",
       "      <td>155</td>\n",
       "      <td>1.27</td>\n",
       "      <td>98.73</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>青海</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>0</td>\n",
       "      <td>18</td>\n",
       "      <td>0.00</td>\n",
       "      <td>100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>澳门</td>\n",
       "      <td>0</td>\n",
       "      <td>46</td>\n",
       "      <td>0</td>\n",
       "      <td>46</td>\n",
       "      <td>0.00</td>\n",
       "      <td>100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>甘肃</td>\n",
       "      <td>0</td>\n",
       "      <td>170</td>\n",
       "      <td>2</td>\n",
       "      <td>168</td>\n",
       "      <td>1.18</td>\n",
       "      <td>98.82</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>宁夏</td>\n",
       "      <td>0</td>\n",
       "      <td>75</td>\n",
       "      <td>0</td>\n",
       "      <td>75</td>\n",
       "      <td>0.00</td>\n",
       "      <td>100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>湖南</td>\n",
       "      <td>0</td>\n",
       "      <td>1019</td>\n",
       "      <td>4</td>\n",
       "      <td>1015</td>\n",
       "      <td>0.39</td>\n",
       "      <td>99.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>贵州</td>\n",
       "      <td>0</td>\n",
       "      <td>147</td>\n",
       "      <td>2</td>\n",
       "      <td>145</td>\n",
       "      <td>1.36</td>\n",
       "      <td>98.64</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>黑龙江</td>\n",
       "      <td>0</td>\n",
       "      <td>948</td>\n",
       "      <td>13</td>\n",
       "      <td>935</td>\n",
       "      <td>1.37</td>\n",
       "      <td>98.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>安徽</td>\n",
       "      <td>0</td>\n",
       "      <td>991</td>\n",
       "      <td>6</td>\n",
       "      <td>985</td>\n",
       "      <td>0.61</td>\n",
       "      <td>99.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>新疆</td>\n",
       "      <td>0</td>\n",
       "      <td>902</td>\n",
       "      <td>3</td>\n",
       "      <td>899</td>\n",
       "      <td>0.33</td>\n",
       "      <td>99.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>海南</td>\n",
       "      <td>0</td>\n",
       "      <td>171</td>\n",
       "      <td>6</td>\n",
       "      <td>165</td>\n",
       "      <td>3.51</td>\n",
       "      <td>96.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>江西</td>\n",
       "      <td>0</td>\n",
       "      <td>935</td>\n",
       "      <td>1</td>\n",
       "      <td>934</td>\n",
       "      <td>0.11</td>\n",
       "      <td>99.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>西藏</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.00</td>\n",
       "      <td>100.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   province  nowConfirm  confirm  dead   heal deadRate healRate\n",
       "0        香港         164     5220   105   4951     2.01    94.85\n",
       "1        上海          76     1080     7    997     0.65    92.31\n",
       "2        台湾          37      535     7    491     1.31    91.78\n",
       "3        广东          37     1877     8   1832     0.43    97.60\n",
       "4        四川          35      724     3    686     0.41    94.75\n",
       "5        陕西          29      434     3    402     0.69    92.63\n",
       "6        山东          14      845     7    824     0.83    97.51\n",
       "7       内蒙古          11      275     1    263     0.36    95.64\n",
       "8        福建          10      417     1    406     0.24    97.36\n",
       "9        云南           9      211     2    200     0.95    94.79\n",
       "10       辽宁           8      280     2    270     0.71    96.43\n",
       "11       天津           8      251     3    240     1.20    95.62\n",
       "12       山西           4      208     0    204     0.00    98.08\n",
       "13       江苏           4      669     0    665     0.00    99.40\n",
       "14       河北           4      368     6    358     1.63    97.28\n",
       "15       河南           3     1281    22   1256     1.72    98.05\n",
       "16       浙江           3     1283     1   1279     0.08    99.69\n",
       "17       重庆           2      586     6    578     1.02    98.63\n",
       "18       北京           1      937     9    927     0.96    98.93\n",
       "19       广西           1      260     2    257     0.77    98.85\n",
       "20       湖北           0    68139  4512  63627     6.62    93.38\n",
       "21       吉林           0      157     2    155     1.27    98.73\n",
       "22       青海           0       18     0     18     0.00   100.00\n",
       "23       澳门           0       46     0     46     0.00   100.00\n",
       "24       甘肃           0      170     2    168     1.18    98.82\n",
       "25       宁夏           0       75     0     75     0.00   100.00\n",
       "26       湖南           0     1019     4   1015     0.39    99.61\n",
       "27       贵州           0      147     2    145     1.36    98.64\n",
       "28      黑龙江           0      948    13    935     1.37    98.63\n",
       "29       安徽           0      991     6    985     0.61    99.39\n",
       "30       新疆           0      902     3    899     0.33    99.67\n",
       "31       海南           0      171     6    165     3.51    96.49\n",
       "32       江西           0      935     1    934     0.11    99.89\n",
       "33       西藏           0        1     0      1     0.00   100.00"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(data_set)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_csv('国内疫情数据.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Bar,Line,Pie,Grid,Map"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>province</th>\n",
       "      <th>nowConfirm</th>\n",
       "      <th>confirm</th>\n",
       "      <th>dead</th>\n",
       "      <th>heal</th>\n",
       "      <th>deadRate</th>\n",
       "      <th>healRate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>香港</td>\n",
       "      <td>164</td>\n",
       "      <td>5220</td>\n",
       "      <td>105</td>\n",
       "      <td>4951</td>\n",
       "      <td>2.01</td>\n",
       "      <td>94.85</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>上海</td>\n",
       "      <td>76</td>\n",
       "      <td>1080</td>\n",
       "      <td>7</td>\n",
       "      <td>997</td>\n",
       "      <td>0.65</td>\n",
       "      <td>92.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>台湾</td>\n",
       "      <td>37</td>\n",
       "      <td>535</td>\n",
       "      <td>7</td>\n",
       "      <td>491</td>\n",
       "      <td>1.31</td>\n",
       "      <td>91.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>广东</td>\n",
       "      <td>37</td>\n",
       "      <td>1877</td>\n",
       "      <td>8</td>\n",
       "      <td>1832</td>\n",
       "      <td>0.43</td>\n",
       "      <td>97.60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>四川</td>\n",
       "      <td>35</td>\n",
       "      <td>724</td>\n",
       "      <td>3</td>\n",
       "      <td>686</td>\n",
       "      <td>0.41</td>\n",
       "      <td>94.75</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  province  nowConfirm  confirm  dead  heal deadRate healRate\n",
       "0       香港         164     5220   105  4951     2.01    94.85\n",
       "1       上海          76     1080     7   997     0.65    92.31\n",
       "2       台湾          37      535     7   491     1.31    91.78\n",
       "3       广东          37     1877     8  1832     0.43    97.60\n",
       "4       四川          35      724     3   686     0.41    94.75"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = df.sort_values(by=['nowConfirm'],ascending=False)[:5]\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['香港', 164], ['上海', 76], ['台湾', 37], ['广东', 37], ['四川', 35]]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[list(i) for i in zip(df2['province'].values.tolist(),df2['nowConfirm'].values.tolist())]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Applications/anaconda3/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"c9bd59241a724d588195a6a88daf9821\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_c9bd59241a724d588195a6a88daf9821 = echarts.init(\n",
       "                    document.getElementById('c9bd59241a724d588195a6a88daf9821'), 'white', {renderer: 'canvas'});\n",
       "                var option_c9bd59241a724d588195a6a88daf9821 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 164\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 76\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 35\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"10%\",\n",
       "                \"30%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{b}:{c}\"\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"left\": \"70%\",\n",
       "            \"top\": \"70%\",\n",
       "            \"orient\": \"vertical\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_c9bd59241a724d588195a6a88daf9821.setOption(option_c9bd59241a724d588195a6a88daf9821);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f950a50>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pie = (\n",
    "    Pie()\n",
    "    .add(\n",
    "        \"\",\n",
    "        [list(i) for i in zip(df2['province'].values.tolist(),df2['nowConfirm'].values.tolist())],\n",
    "        radius = [\"10%\",\"30%\"]\n",
    "    )\n",
    "    .set_global_opts(\n",
    "        legend_opts=opts.LegendOpts(orient=\"vertical\",pos_top=\"70%\",pos_left=\"70%\"),\n",
    "    )\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(formatter=\"{b}:{c}\"))\n",
    ")\n",
    "pie.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Applications/anaconda3/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"c5e7f0f48cd44fcbb6066d52c86756b3\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_c5e7f0f48cd44fcbb6066d52c86756b3 = echarts.init(\n",
       "                    document.getElementById('c5e7f0f48cd44fcbb6066d52c86756b3'), 'white', {renderer: 'canvas'});\n",
       "                var option_c5e7f0f48cd44fcbb6066d52c86756b3 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6cbb\\u6108\\u7387\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u9999\\u6e2f\",\n",
       "                    \"2.01\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    \"0.65\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    \"1.31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    \"0.43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    \"0.41\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    \"0.69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    \"0.83\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"0.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    \"0.24\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    \"0.95\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    \"0.71\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    \"1.20\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    \"1.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    \"1.72\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    \"0.08\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    \"1.02\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    \"0.96\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    \"0.77\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    \"6.62\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    \"1.27\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6fb3\\u95e8\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    \"1.18\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    \"0.39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    \"1.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"1.37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    \"0.61\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    \"0.33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    \"3.51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    \"0.11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    \"0.00\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6b7b\\u4ea1\\u7387\",\n",
       "            \"connectNulls\": false,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u9999\\u6e2f\",\n",
       "                    \"94.85\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    \"92.31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    \"91.78\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    \"97.60\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    \"94.75\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    \"92.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    \"97.51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"95.64\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    \"97.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    \"94.79\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    \"96.43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    \"95.62\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    \"98.08\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    \"99.40\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    \"97.28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    \"98.05\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    \"99.69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    \"98.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    \"98.93\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    \"98.85\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    \"93.38\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    \"98.73\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6fb3\\u95e8\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    \"98.82\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    \"99.61\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    \"98.64\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"98.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    \"99.39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    \"99.67\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    \"96.49\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    \"99.89\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    \"100.00\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6cbb\\u6108\\u7387\",\n",
       "                \"\\u6b7b\\u4ea1\\u7387\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u6cbb\\u6108\\u7387\": true,\n",
       "                \"\\u6b7b\\u4ea1\\u7387\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u9655\\u897f\",\n",
       "                \"\\u5c71\\u4e1c\",\n",
       "                \"\\u5185\\u8499\\u53e4\",\n",
       "                \"\\u798f\\u5efa\",\n",
       "                \"\\u4e91\\u5357\",\n",
       "                \"\\u8fbd\\u5b81\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u5c71\\u897f\",\n",
       "                \"\\u6c5f\\u82cf\",\n",
       "                \"\\u6cb3\\u5317\",\n",
       "                \"\\u6cb3\\u5357\",\n",
       "                \"\\u6d59\\u6c5f\",\n",
       "                \"\\u91cd\\u5e86\",\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u5e7f\\u897f\",\n",
       "                \"\\u6e56\\u5317\",\n",
       "                \"\\u5409\\u6797\",\n",
       "                \"\\u9752\\u6d77\",\n",
       "                \"\\u6fb3\\u95e8\",\n",
       "                \"\\u7518\\u8083\",\n",
       "                \"\\u5b81\\u590f\",\n",
       "                \"\\u6e56\\u5357\",\n",
       "                \"\\u8d35\\u5dde\",\n",
       "                \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                \"\\u5b89\\u5fbd\",\n",
       "                \"\\u65b0\\u7586\",\n",
       "                \"\\u6d77\\u5357\",\n",
       "                \"\\u6c5f\\u897f\",\n",
       "                \"\\u897f\\u85cf\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6b7b\\u4ea1\\u7387\\u4e0e\\u6cbb\\u6108\\u7387\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_c5e7f0f48cd44fcbb6066d52c86756b3.setOption(option_c5e7f0f48cd44fcbb6066d52c86756b3);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f7d9550>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "line = (\n",
    "    Line()\n",
    "    .add_xaxis(list(df['province'].values))\n",
    "    .add_yaxis(\"治愈率\",df['deadRate'].values.tolist())\n",
    "    .add_yaxis(\"死亡率\",df['healRate'].values.tolist())\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"死亡率与治愈率\"),\n",
    "    )\n",
    ")\n",
    "line.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Applications/anaconda3/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"e44c4baea3df44619d8b3dc3407f8bf1\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_e44c4baea3df44619d8b3dc3407f8bf1 = echarts.init(\n",
       "                    document.getElementById('e44c4baea3df44619d8b3dc3407f8bf1'), 'white', {renderer: 'canvas'});\n",
       "                var option_e44c4baea3df44619d8b3dc3407f8bf1 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u6b7b\\u4ea1\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                105,\n",
       "                7,\n",
       "                7,\n",
       "                8,\n",
       "                3,\n",
       "                3\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u6cbb\\u6108\",\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                4951,\n",
       "                997,\n",
       "                491,\n",
       "                1832,\n",
       "                686,\n",
       "                402\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6b7b\\u4ea1\",\n",
       "                \"\\u6cbb\\u6108\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u6b7b\\u4ea1\": true,\n",
       "                \"\\u6cbb\\u6108\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u9655\\u897f\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u5730\\u533a\\u6b7b\\u4ea1\\u4e0e\\u6cbb\\u6108\\u4eba\\u6570\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"dataZoom\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"type\": \"slider\",\n",
       "            \"realtime\": true,\n",
       "            \"start\": 20,\n",
       "            \"end\": 80,\n",
       "            \"orient\": \"horizontal\",\n",
       "            \"zoomLock\": false,\n",
       "            \"filterMode\": \"filter\"\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_e44c4baea3df44619d8b3dc3407f8bf1.setOption(option_e44c4baea3df44619d8b3dc3407f8bf1);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f9bdd10>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bar = (\n",
    "    Bar()\n",
    "    .add_xaxis(list(df['province'].values)[:6])\n",
    "    .add_yaxis(\"死亡\",df['dead'].values.tolist()[:6])\n",
    "    .add_yaxis(\"治愈\",df['heal'].values.tolist()[:6])\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"各地区死亡与治愈人数\"),\n",
    "        datazoom_opts=[opts.DataZoomOpts()],\n",
    "    )\n",
    ")\n",
    "bar.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Applications/anaconda3/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"7e6b248ebb254fe497d8c85374ac611a\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_7e6b248ebb254fe497d8c85374ac611a = echarts.init(\n",
       "                    document.getElementById('7e6b248ebb254fe497d8c85374ac611a'), 'white', {renderer: 'canvas'});\n",
       "                var option_7e6b248ebb254fe497d8c85374ac611a = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u73b0\\u6709\\u786e\\u8bca\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 164\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 76\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 35\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": 29\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": 14\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": 11\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": 10\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6fb3\\u95e8\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": 0\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {}\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u73b0\\u6709\\u786e\\u8bca\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u73b0\\u6709\\u786e\\u8bca\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"left\": \"90%\",\n",
       "            \"top\": \"60%\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u5730\\u533a\\u786e\\u8bca\\u4eba\\u6570\",\n",
       "            \"left\": \"65%\",\n",
       "            \"top\": \"48%\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"piecewise\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 200,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"inverse\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 14,\n",
       "        \"borderWidth\": 0\n",
       "    }\n",
       "};\n",
       "                chart_7e6b248ebb254fe497d8c85374ac611a.setOption(option_7e6b248ebb254fe497d8c85374ac611a);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f998150>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "china_map = (\n",
    "    Map()\n",
    "    .add(\"现有确诊\",[list(i) for i in zip(df['province'].values.tolist(),df['nowConfirm'].values.tolist())])\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"各地区确诊人数\",pos_top=\"48%\",pos_left=\"65%\"),\n",
    "        visualmap_opts=opts.VisualMapOpts(max_=200,is_piecewise=True),\n",
    "        legend_opts=opts.LegendOpts(pos_left=\"90%\",pos_top=\"60%\"),\n",
    "    )\n",
    ")\n",
    "china_map.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Applications/anaconda3/lib/python3.7/site-packages/pyecharts/charts/composite_charts/grid.py:17: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"ef28d8f0f04a4695b36bde73f24115bd\" style=\"width:1600px; height:900px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_ef28d8f0f04a4695b36bde73f24115bd = echarts.init(\n",
       "                    document.getElementById('ef28d8f0f04a4695b36bde73f24115bd'), 'white', {renderer: 'canvas'});\n",
       "                var option_ef28d8f0f04a4695b36bde73f24115bd = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6cbb\\u6108\\u7387\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u9999\\u6e2f\",\n",
       "                    \"2.01\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    \"0.65\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    \"1.31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    \"0.43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    \"0.41\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    \"0.69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    \"0.83\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"0.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    \"0.24\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    \"0.95\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    \"0.71\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    \"1.20\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    \"1.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    \"1.72\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    \"0.08\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    \"1.02\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    \"0.96\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    \"0.77\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    \"6.62\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    \"1.27\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6fb3\\u95e8\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    \"1.18\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    \"0.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    \"0.39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    \"1.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"1.37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    \"0.61\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    \"0.33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    \"3.51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    \"0.11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    \"0.00\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6b7b\\u4ea1\\u7387\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u9999\\u6e2f\",\n",
       "                    \"94.85\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    \"92.31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    \"91.78\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    \"97.60\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    \"94.75\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    \"92.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    \"97.51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"95.64\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    \"97.36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    \"94.79\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    \"96.43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    \"95.62\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    \"98.08\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    \"99.40\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    \"97.28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    \"98.05\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    \"99.69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    \"98.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    \"98.93\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    \"98.85\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    \"93.38\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    \"98.73\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6fb3\\u95e8\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    \"98.82\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    \"100.00\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    \"99.61\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    \"98.64\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"98.63\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    \"99.39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    \"99.67\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    \"96.49\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    \"99.89\"\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    \"100.00\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u6b7b\\u4ea1\",\n",
       "            \"xAxisIndex\": 1,\n",
       "            \"yAxisIndex\": 1,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                105,\n",
       "                7,\n",
       "                7,\n",
       "                8,\n",
       "                3,\n",
       "                3\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u6cbb\\u6108\",\n",
       "            \"xAxisIndex\": 1,\n",
       "            \"yAxisIndex\": 1,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                4951,\n",
       "                997,\n",
       "                491,\n",
       "                1832,\n",
       "                686,\n",
       "                402\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"pie\",\n",
       "            \"clockwise\": true,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 164\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 76\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 35\n",
       "                }\n",
       "            ],\n",
       "            \"radius\": [\n",
       "                \"10%\",\n",
       "                \"30%\"\n",
       "            ],\n",
       "            \"center\": [\n",
       "                \"50%\",\n",
       "                \"50%\"\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{b}:{c}\"\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            },\n",
       "            \"xAxisIndex\": 2,\n",
       "            \"yAxisIndex\": 2\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u73b0\\u6709\\u786e\\u8bca\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u9999\\u6e2f\",\n",
       "                    \"value\": 164\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 76\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 37\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 35\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": 29\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": 14\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": 11\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": 10\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": 9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": 4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": 3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": 1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6fb3\\u95e8\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": 0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": 0\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {},\n",
       "            \"xAxisIndex\": 3,\n",
       "            \"yAxisIndex\": 3\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6cbb\\u6108\\u7387\",\n",
       "                \"\\u6b7b\\u4ea1\\u7387\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u6cbb\\u6108\\u7387\": true,\n",
       "                \"\\u6b7b\\u4ea1\\u7387\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        },\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6b7b\\u4ea1\",\n",
       "                \"\\u6cbb\\u6108\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u6b7b\\u4ea1\": true,\n",
       "                \"\\u6cbb\\u6108\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        },\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\"\n",
       "            ],\n",
       "            \"selected\": {},\n",
       "            \"show\": true,\n",
       "            \"left\": \"70%\",\n",
       "            \"top\": \"70%\",\n",
       "            \"orient\": \"vertical\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        },\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u73b0\\u6709\\u786e\\u8bca\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u73b0\\u6709\\u786e\\u8bca\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"left\": \"90%\",\n",
       "            \"top\": \"60%\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u9655\\u897f\",\n",
       "                \"\\u5c71\\u4e1c\",\n",
       "                \"\\u5185\\u8499\\u53e4\",\n",
       "                \"\\u798f\\u5efa\",\n",
       "                \"\\u4e91\\u5357\",\n",
       "                \"\\u8fbd\\u5b81\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u5c71\\u897f\",\n",
       "                \"\\u6c5f\\u82cf\",\n",
       "                \"\\u6cb3\\u5317\",\n",
       "                \"\\u6cb3\\u5357\",\n",
       "                \"\\u6d59\\u6c5f\",\n",
       "                \"\\u91cd\\u5e86\",\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u5e7f\\u897f\",\n",
       "                \"\\u6e56\\u5317\",\n",
       "                \"\\u5409\\u6797\",\n",
       "                \"\\u9752\\u6d77\",\n",
       "                \"\\u6fb3\\u95e8\",\n",
       "                \"\\u7518\\u8083\",\n",
       "                \"\\u5b81\\u590f\",\n",
       "                \"\\u6e56\\u5357\",\n",
       "                \"\\u8d35\\u5dde\",\n",
       "                \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                \"\\u5b89\\u5fbd\",\n",
       "                \"\\u65b0\\u7586\",\n",
       "                \"\\u6d77\\u5357\",\n",
       "                \"\\u6c5f\\u897f\",\n",
       "                \"\\u897f\\u85cf\"\n",
       "            ]\n",
       "        },\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 1,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u9999\\u6e2f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u53f0\\u6e7e\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u9655\\u897f\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 1,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6b7b\\u4ea1\\u7387\\u4e0e\\u6cbb\\u6108\\u7387\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        },\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u5730\\u533a\\u6b7b\\u4ea1\\u4e0e\\u6cbb\\u6108\\u4eba\\u6570\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        },\n",
       "        {\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        },\n",
       "        {\n",
       "            \"text\": \"\\u5404\\u5730\\u533a\\u786e\\u8bca\\u4eba\\u6570\",\n",
       "            \"left\": \"65%\",\n",
       "            \"top\": \"48%\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"top\": \"60%\",\n",
       "            \"right\": \"60%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        },\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"right\": \"60%\",\n",
       "            \"bottom\": \"60%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        },\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"top\": \"30%\",\n",
       "            \"right\": \"30%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        },\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"top\": \"60%\",\n",
       "            \"right\": \"60%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_ef28d8f0f04a4695b36bde73f24115bd.setOption(option_ef28d8f0f04a4695b36bde73f24115bd);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x11f9bda50>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "grid = (\n",
    "    Grid(init_opts=opts.InitOpts(width=\"1600px\",height=\"900px\"))\n",
    "    .add(line,grid_opts=opts.GridOpts(pos_top=\"60%\",pos_right=\"60%\"))\n",
    "    .add(bar,grid_opts=opts.GridOpts(pos_bottom=\"60%\",pos_right=\"60%\"))\n",
    "    .add(pie,grid_opts=opts.GridOpts(pos_top=\"30%\",pos_right=\"30%\"))\n",
    "    .add(china_map,grid_opts=opts.GridOpts(pos_top=\"60%\",pos_right=\"60%\"))\n",
    ")\n",
    "grid.render()\n",
    "grid.render_notebook()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
